<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>点击图⽚，图⽚向左翻转 90 度翻转。</title>
</head>

<body>
  <img src="https://p3.ifengimg.com/2018_50/3A53D7E2CCFA691A0686B99629A279EF3AE20CFC_w1024_h1536.jpg" width="400px"
    height="500px" id="img1">
  <script>
    document.getElementById('img1').onclick = function () {
      img1.style.transform = 'rotate(-90deg)'
    }
  </script>
</body>

</html>